package com.woniuxy.patrol.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 点位巡更记录表
 * @TableName wcm_patrol_point_record
 */
@TableName(value ="wcm_patrol_point_record")
@Data
@AllArgsConstructor
@NoArgsConstructor
public class PatrolPointRecord implements Serializable {
    /**
     * ID
     */
    @TableId(type = IdType.AUTO)
    private Long recordId;

    /**
     * 巡更点ID
     */
    private Long pointId;

    /**
     * 
     */
    private String pointName;

    /**
     * 任务ID
     */
    private Long taskId;

    /**
     * 路线ID
     */
    private Long routeId;

    /**
     * 
     */
    private Long executorId;

    /**
     * 执行人员
     */
    private String executorName;

    /**
     * 巡检时间
     */
    private Date patrolTime;

    /**
     * 
     */
    private Long categoryId;

    /**
     * 巡检类型
     */
    private String categoryName;

    /**
     * 巡检结果
     */
    private String patrolResult;

    /**
     * 照片链接
     */
    @TableField("photo_urls")
    private String photoUrls;

    /**
     * 
     */
    private String remark;

    /**
     * 
     */
    private String areaName;

    /**
     * 打卡位置经度
     */
    private BigDecimal longitude;

    /**
     * 打卡位置纬度
     */
    private BigDecimal latitude;

    /**
     * 是否删除，0删除 1存在
     */
    private Integer isDelete;

    /**
     * 创建人
     */
    private String createBy;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 修改人
     */
    private String updateBy;

    /**
     * 修改时间
     */
    private Date updateTime;

    /**
     * 点位状态：0未打卡 1已打卡 2逾期
     */
    private Integer status;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        PatrolPointRecord other = (PatrolPointRecord) that;
        return (this.getRecordId() == null ? other.getRecordId() == null : this.getRecordId().equals(other.getRecordId()))
            && (this.getPointId() == null ? other.getPointId() == null : this.getPointId().equals(other.getPointId()))
            && (this.getPointName() == null ? other.getPointName() == null : this.getPointName().equals(other.getPointName()))
            && (this.getTaskId() == null ? other.getTaskId() == null : this.getTaskId().equals(other.getTaskId()))
            && (this.getRouteId() == null ? other.getRouteId() == null : this.getRouteId().equals(other.getRouteId()))
            && (this.getExecutorId() == null ? other.getExecutorId() == null : this.getExecutorId().equals(other.getExecutorId()))
            && (this.getExecutorName() == null ? other.getExecutorName() == null : this.getExecutorName().equals(other.getExecutorName()))
            && (this.getPatrolTime() == null ? other.getPatrolTime() == null : this.getPatrolTime().equals(other.getPatrolTime()))
            && (this.getCategoryId() == null ? other.getCategoryId() == null : this.getCategoryId().equals(other.getCategoryId()))
            && (this.getCategoryName() == null ? other.getCategoryName() == null : this.getCategoryName().equals(other.getCategoryName()))
            && (this.getPatrolResult() == null ? other.getPatrolResult() == null : this.getPatrolResult().equals(other.getPatrolResult()))
            && (this.getPhotoUrls() == null ? other.getPhotoUrls() == null : this.getPhotoUrls().equals(other.getPhotoUrls()))
            && (this.getRemark() == null ? other.getRemark() == null : this.getRemark().equals(other.getRemark()))
            && (this.getAreaName() == null ? other.getAreaName() == null : this.getAreaName().equals(other.getAreaName()))
            && (this.getLongitude() == null ? other.getLongitude() == null : this.getLongitude().equals(other.getLongitude()))
            && (this.getLatitude() == null ? other.getLatitude() == null : this.getLatitude().equals(other.getLatitude()))
            && (this.getIsDelete() == null ? other.getIsDelete() == null : this.getIsDelete().equals(other.getIsDelete()))
            && (this.getCreateBy() == null ? other.getCreateBy() == null : this.getCreateBy().equals(other.getCreateBy()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getUpdateBy() == null ? other.getUpdateBy() == null : this.getUpdateBy().equals(other.getUpdateBy()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getRecordId() == null) ? 0 : getRecordId().hashCode());
        result = prime * result + ((getPointId() == null) ? 0 : getPointId().hashCode());
        result = prime * result + ((getPointName() == null) ? 0 : getPointName().hashCode());
        result = prime * result + ((getTaskId() == null) ? 0 : getTaskId().hashCode());
        result = prime * result + ((getRouteId() == null) ? 0 : getRouteId().hashCode());
        result = prime * result + ((getExecutorId() == null) ? 0 : getExecutorId().hashCode());
        result = prime * result + ((getExecutorName() == null) ? 0 : getExecutorName().hashCode());
        result = prime * result + ((getPatrolTime() == null) ? 0 : getPatrolTime().hashCode());
        result = prime * result + ((getCategoryId() == null) ? 0 : getCategoryId().hashCode());
        result = prime * result + ((getCategoryName() == null) ? 0 : getCategoryName().hashCode());
        result = prime * result + ((getPatrolResult() == null) ? 0 : getPatrolResult().hashCode());
        result = prime * result + ((getPhotoUrls() == null) ? 0 : getPhotoUrls().hashCode());
        result = prime * result + ((getRemark() == null) ? 0 : getRemark().hashCode());
        result = prime * result + ((getAreaName() == null) ? 0 : getAreaName().hashCode());
        result = prime * result + ((getLongitude() == null) ? 0 : getLongitude().hashCode());
        result = prime * result + ((getLatitude() == null) ? 0 : getLatitude().hashCode());
        result = prime * result + ((getIsDelete() == null) ? 0 : getIsDelete().hashCode());
        result = prime * result + ((getCreateBy() == null) ? 0 : getCreateBy().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getUpdateBy() == null) ? 0 : getUpdateBy().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", recordId=").append(recordId);
        sb.append(", pointId=").append(pointId);
        sb.append(", pointName=").append(pointName);
        sb.append(", taskId=").append(taskId);
        sb.append(", routeId=").append(routeId);
        sb.append(", executorId=").append(executorId);
        sb.append(", executorName=").append(executorName);
        sb.append(", patrolTime=").append(patrolTime);
        sb.append(", categoryId=").append(categoryId);
        sb.append(", categoryName=").append(categoryName);
        sb.append(", patrolResult=").append(patrolResult);
        sb.append(", photoUrls=").append(photoUrls);
        sb.append(", remark=").append(remark);
        sb.append(", areaName=").append(areaName);
        sb.append(", longitude=").append(longitude);
        sb.append(", latitude=").append(latitude);
        sb.append(", isDelete=").append(isDelete);
        sb.append(", createBy=").append(createBy);
        sb.append(", createTime=").append(createTime);
        sb.append(", updateBy=").append(updateBy);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", status=").append(status);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}